package com.heima.apis.article;

import com.heima.apis.article.fallback.ArticleFeignClientFallback;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-article",fallbackFactory = ArticleFeignClientFallback.class)
public interface ArticleFeignClient {

    /**
     * 调用文章微服务实现文章数据发布
     *
     * @param dto
     * @return
     */
    @PostMapping(path = "/api/v1/article/save")
    public ResponseResult<Long> save(@RequestBody ArticleDto dto);
}
